# Maintainer: Thore Bödecker <foxxx0@archlinux.org>
# Contributor: Lauri Niskanen <ape@ape3000.com>
# Contributor: Michael Barbour <barbour.michael.0@gmail.com>
# Contributor: sekret

pkgname=dsp
_commit='37aafe2b76bac20e49a729d3bf66800d501fa658'
pkgver=1.9
pkgrel=3
pkgdesc="An audio processing program with an interactive mode"
arch=('loong64' 'x86_64')
url="https://github.com/bmc0/${pkgname}"
license=('ISC')
groups=('ladspa-plugins')
makedepends=('git' 'ladspa')
depends=(
  'libmad' 'libtool'
  'ffmpeg' 'libavcodec.so' 'libavformat.so' 'libavutil.so'
  'alsa-lib' 'libasound.so'
  'fftw' 'libfftw3.so'
  'libao' 'libao.so'
  'libpulse' 'libpulse.so' 'libpulse-simple.so'
  'libsndfile' 'libsndfile.so'
  'zita-convolver' 'libzita-convolver.so'
)
optdepends=(
  'ladspa-host: For the LADSPA plugin.'
)
source=("${pkgname}::git+https://github.com/bmc0/${pkgname}.git#commit=${_commit}")
sha256sums=('SKIP')

build() {
  cd "${srcdir}/${pkgname}"
  ./configure --prefix=/usr
  make
}

package() {
  cd "${srcdir}/${pkgname}"
  make DESTDIR="${pkgdir}" install
  install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
